Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General code cleanup and many minor fixes #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gitpushoriginmaster
Copy link

@gitpushoriginmaster gitpushoriginmaster commented Dec 17, 2022

When using basic-pitch I encountered a few cases of dead code, redundant calculations, and unclear try-except blocks.

This PR is a bunch of many single-line changes. I hope my attempt to fix some of these issues is welcome.

Comment on lines -207 to -217
x_contours = tfkl.Conv2D(
n_filters_contour,
(5, 5),
padding="same",
kernel_initializer=_initializer(),
kernel_constraint=_kernel_constraint(),
)(x)

x_contours = tfkl.BatchNormalization()(x_contours)
x_contours = tfkl.ReLU()(x_contours)

Copy link
Author

@gitpushoriginmaster gitpushoriginmaster Dec 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note I'm including this cleanup that was discussed in #23, but since it creates a layer and overwrites it, I think that these lines are just computationally meaningless and have no effect on the output, but should maybe stay for 'when it is the time to fix it'.

If you'd like to leave this implementation as it is, I'll re-add this code as it was and leave references for this bug as a comment in the code.

@gitpushoriginmaster gitpushoriginmaster changed the title Remove dead code and many minor fixes General code cleanup and many minor fixes Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants